package com.yazi.mxz.behavior.entity.repository;


import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * 商品信息访问日志
 * @author mo_yq5
 * @date 2015-9-7
 */
@Document
public class StoreGoodsAccess implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Indexed
	private StoreGoodsAccessId id;
	@DBRef
	private StoreGoods storeGoods;
	private Long accessTime; // 访问时间
	@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
	private double[] location;// 位置(即店铺位置)
	public StoreGoodsAccessId getId() {
		return id;
	}
	public void setId(StoreGoodsAccessId id) {
		this.id = id;
	}
	public Long getAccessTime() {
		return accessTime;
	}
	public void setAccessTime(Long accessTime) {
		this.accessTime = accessTime;
	}
	public StoreGoods getStoreGoods() {
		return storeGoods;
	}
	public void setStoreGoods(StoreGoods storeGoods) {
		this.storeGoods = storeGoods;
	}
	public double[] getLocation() {
		return location;
	}
	public void setLocation(double[] location) {
		this.location = location;
	}
}
